C code for PESetFont

The following sample code demonstrates how to use the PESetFont function:

BOOL        result;
short    sectionCode,            // The section to change font in
    scopeCode,            // Apply to fields or text?
    fontFamily,
    fontPitch,
    charSet,
    pointSize,
    isItalic,
    isUnderlined,
    isStruckOut,
    weight;
char faceName [] = "Arial";        // Use the Arial font face
sectionCode = PE_ALLSECTIONS;        // Apply change to all sections
scopeCode = PE_FIELDS | PE_TEXT;    // Apply to both fields and text
fontFamily = FF_DONTCARE;        // Use default
fontPitch = DEFAULT_PITCH;
charSet = ANSI_CHARSET;        // Use ANSI Character set
pointSize = 12;
isItalic = PE_UNCHANGED;        // Keep as is
isUnderlined = TRUE;            // Underline characters
isStruckOut = FALSE;
weight = FW_BOLD;            // Bold text
result = PESetFont(Job, sectionCode, scopeCode, faceName, fontFamily, fontPitch, charSet, pointSize, isItalic, isUnderlined, isStruckOut, weight);
if (!result){
    // Handle error
}


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com